package com.dkcrow.spring.transaction;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.dkcrow.spring.transaction.aop.TargetClass;

/**
 * Hello world!
 *
 */
public class AspectJApp
{
	final static Logger logger = LoggerFactory.getLogger(AspectJApp.class.getClass());
	
    public static void main( String[] args )
    {
    	ApplicationContext ap = new ClassPathXmlApplicationContext("spring/aspectj-context.xml");
    	TargetClass targetClass = (TargetClass) ap.getBean("targetClass");
//    	targetClass.hey();
    	targetClass.testHey();
    	logger.info("addr1 : {}",targetClass);
//    	TargetClass targetClass2 = new TargetClass();
//    	targetClass2.testHey();
//    	logger.info("addr2 : {}",targetClass2);
    }
}
